#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
struct S
{
	string s1;	
}arr[110];
bool cmp(struct S s1,struct S s2){
	return s1.s1 < s2.s1;
}
int main(){
	int n;
	cin >> n;
	for(int i = 0 ; i < n; i++){
		cin >> arr[i].s1;
	}
	sort(arr, arr + n,cmp);
	for(int i = 0 ; i < n; i++){
		cout << arr[i].s1 << endl;
	}
	return 0;
} 
